package demo.servlet.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Application Lifecycle Listener implementation class DemoServletListener
 * 
 */
public class DemoServletListener implements ServletContextListener {

    private static final Log _log = LogFactory.getLog(DemoServletListener.class.getSimpleName());

    /**
     * Default constructor.
     */
    public DemoServletListener() {
        // empty
    }

    /**
     * @see ServletContextListener#contextInitialized(ServletContextEvent)
     */
    public void contextInitialized(ServletContextEvent event) {
        _log.info("start " + DemoServletListener.class.getSimpleName());
    }

    /**
     * @see ServletContextListener#contextDestroyed(ServletContextEvent)
     */
    public void contextDestroyed(ServletContextEvent event) {
        _log.info("end " + DemoServletListener.class.getSimpleName());
    }

}
